001 /*
002 * Copyright 2005 Stephen J. McConnell
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
013 * implied.
014 *
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018
019 package net.dpml.library;
020
021 /**
022 * The Dictonary interface exposes operations dealing with named properties.
023 *
024 * @author <a href="http://www.dpml.net">Digital Product Meta Library</a>
025 * @version 1.1.0
026 */
027 public interface Dictionary
028 {
029 /**
030 * Return the property names associated with the dictionary.
031 * @return the array of property names
032 */
033 String[] getPropertyNames();
034
035 /**
036 * Return the local property names associated with the dictionary.
037 * @return the array of local property names
038 */
039 String[] getLocalPropertyNames();
040
041 /**
042 * Return a property value.
043 * @param key the property key
044 * @return the property value
045 */
046 String getProperty( String key );
047
048 /**
049 * Return a property value.
050 * @param key the property key
051 * @param value the default value
052 * @return the property value
053 */
054 String getProperty( String key, String value );
055
056 /**
057 * Return an boolean property value.
058 * @param key the property key
059 * @param value the default value
060 * @return the property value as an boolean
061 */
062 boolean getBooleanProperty( String key, boolean value );
063
064 /**
065 * Return an integer property value.
066 * @param key the property key
067 * @param value the default value
068 * @return the property value as an integer
069 */
070 int getIntegerProperty( String key, int value );
071
072 /**
073 * Evaluate and expand any symbolic references in the supplied value.
074 * @param value the value to resolve
075 * @return the resolved value
076 */
077 String resolve( String value );
078
079 }